package com.vdimitr.katapotter;

import java.util.HashSet;
import java.util.Set;

/**
 * A Bucket contains a set of unique books.
 * 
 * @author vasileios.dimitriadis
 *
 */
public class Bucket {

	private Set<Book> books;
	
	public Bucket() {
		books = new HashSet<Book>();
	}
	
	public boolean add(Book book) {
		return books.add(book);
	}
	
	public boolean containsBook(Book book) {
		return books.contains(book);
	}
	
	public int numberOfBooks() {
		return books.size();
	}
	
	public boolean remove(Book book) {
		return books.remove(book);
	}
	
}
